Apache Wink : 7.7 OpenSearch
This page last changed on Oct 14, 2009 by michael.
OpenSearch OverviewOpenSearch is a collection of simple formats for the sharing of search results. The OpenSearch response elements can be used to extend existing syndication formats, such as RSS and Atom, with the extra metadata needed to return search results. The OpenSearch document is associated with the "application/opensearchdescription+xml" mime type.
Data ModelApache Wink provides an Open Search data model for producing Open Search Documents. of the model classes are located under the org.apache.wink.common.model.opensearch package. OpenSearchDescription class is used by an application to build Open Search Description documents. OpenSearch SupportThe following table shows the OpenSearch data model and representation in which it can be serialized and de-serialized.
Producing an OpenSearch Document ExampleThe following example demonstrates the creation of an OpenSearch document. @GET @Produces(MediaTypeUtils.OPENSEARCH) public OpenSearchDescription getOpenSearch(@Context UriInfo info) { String baseUri = info.getAbsolutePath().toString(); OpenSearchDescription openSearchDescription = new OpenSearchDescription(); openSearchDescription.setShortName("Example search engine"); ... return openSearchDescription; } |
Document generated by Confluence on Nov 11, 2009 06:57 |